package com.telit.firecommand.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * fire_sms_push_log
 * @author 
 */
@ApiModel(value="com.telit.entity.FireSmsPushLog火情短信推送日志表")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FireSmsPushLog implements Serializable {
    /**
     * 主键
     */
    @ApiModelProperty(value="主键")
    private Long id;

    /**
     * 火情表id
     */
    @ApiModelProperty(value="火情表id")
    private Long fireId;

    /**
     * 火情状态 0待处置 1处置中
     */
    @ApiModelProperty(value="火情状态 0待处置 1处置中")
    private Short status;

    /**
     * 推送对象姓名
     */
    @ApiModelProperty(value="推送对象姓名")
    private String pushName;

    /**
     * 消息推送时间
     */
    @ApiModelProperty(value="消息推送时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date pushTime;

    /**
     * 推送人
     */
    @ApiModelProperty(value="推送人")
    private String sendPerson;

    /**
     * 推送对象所属机构
     */
    @ApiModelProperty(value="推送对象所属机构")
    private String pushUnit;

    /**
     * 推送对象id
     */
    @ApiModelProperty(value="推送对象id")
    private Long pushId;

    public FireSmsPushLog(Long fireId, Short status, String pushName, Date time, String sendPerson, String pushUnit, Long pushId){
        this.fireId = fireId;
        this.status = status;
        this.pushName = pushName;
        this.pushTime = time;
        this.sendPerson = sendPerson;
        this.pushUnit = pushUnit;
        this.pushId = pushId;
    }

    private static final long serialVersionUID = 1L;
}